package io.renren.modules.erp.service;


import com.baomidou.mybatisplus.extension.service.IService;
import io.renren.common.utils.PageUtils;
import io.renren.modules.erp.entity.Person;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface PersonService extends IService<Person> {

    Person getPerson(long id)throws Exception ;
    List<Person> getPersonListByIds(String ids)throws Exception ;

    List<Person> getPerson()throws Exception ;

    PageUtils select(String name, String type, int currPage, int pageSize)throws Exception ;
    Long countPerson(String name, String type)throws Exception ;

    int insertPerson(String beanJson, HttpServletRequest request)throws Exception ;

    int updatePerson(String beanJson, Long id, HttpServletRequest request)throws Exception ;

    int deletePerson(Long id, HttpServletRequest request)throws Exception ;

    int batchDeletePerson(String ids, HttpServletRequest request) throws Exception;

    int checkIsNameExist(Long id, String name) throws Exception;

    String getPersonByIds(String personIDs)throws Exception ;
    List<Person> getPersonByType(String type)throws Exception;

    int batchDeletePersonByIds(String ids,Long userId)throws Exception ;
    int batchDeletePersonByIdsNormal(String ids,Long userId) throws Exception;
}
